home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-08 | 12.6 KB | 556 lines | [TEXT/MPS ] |
- /*
- File: PanelEditor.r
-
- Contains: PanelEditor Resources
-
- Written by: Steve Smith
-
- Copyright: © 1994,95 by Apple Computer, Inc., all rights reserved.
- */
-
- #define SystemSevenOrBetter 1 // we want the extended types
- #define SystemSevenOrLater 1 // Types.r uses this variable
-
- // -- MPW Rez Includes --
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "CodeFragmentTypes.r"
-
- // -- OpenDoc Includes --
-
- #ifndef __ODTYPES_R__
- #include "ODTypes.r"
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdDefs_defined
- #include "StdDefs.h"
- #endif
-
- // -- PanelEditor Includes --
-
- #ifndef _PANELEDITORDEF_
- #include "PanelEditorDef.h"
- #endif
-
- #ifndef _PANELEDITORVERS_
- #include "PanelEditorVers.h"
- #endif
-
- //-------------------------------------------------------------------------------------
- // .rsrc resources
- //-------------------------------------------------------------------------------------
-
- // PanelEditor - include resources from my .rsrc file (PICTs etc.)
- include "PanelEditorOtherResources.rsrc" not 'ckid';
-
- //-------------------------------------------------------------------------------------
- // Finder Version Resources
- //-------------------------------------------------------------------------------------
-
- // Part's Finder Version Resource
-
- resource 'vers' (1) {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- shortVersionStr,
- shortVersionStr", © Apple Computer, Inc. 1994-1995"
- };
-
- resource 'vers' (2) {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- shortVersionStr,
- "OpenDoc™ Sample Code"
- };
-
- //-------------------------------------------------------------------------------------
- // Code Fragment Resources
- //-------------------------------------------------------------------------------------
-
- resource 'cfrg' (0) {
- { /* [1] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kPanelEditorID, /* This must be the class ID. */
- /* [2] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kPartClassName /* This must be the SOM class name */
- /* for this part. */
- }
- };
-
- //-------------------------------------------------------------------------------------
- // NMAP Resources
- //-------------------------------------------------------------------------------------
-
- // Map a part's class id (module::classname)
- // to a part's kind (unique content identifier)
- //
- resource kODNameMappings (kEditorKindMapId) {
- kODEditorKinds,
- { /* array Types: 1 elements */
- /* [1] */
- kPanelEditorID,
- kODIsAnISOStringList
- {
- { /* array ClassIDs: 1 elements */
- /* [1] */
- kPanelEditorKind
- }
- }
- }
- };
-
- // Map a part's class id (module::classname)
- // to the part editor's name
- //
- resource kODNameMappings (kEditorUserStringMapId) {
- kODEditorUserString,
- { /* array Types: 1 elements */
- /* [1] */
- kPanelEditorID,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kPanelEditorEditorUserString
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to a generic content category identifier
- //
- resource kODNameMappings (kKindCategoryMapId) {
- kODKind,
- { /* array Types: 1 elements */
- /* [1] */
- kPanelEditorKind,
- kODIsAnISOStringList
- {
- { /* array ClassIDs: 1 elements */
- /* [1] */
- kODCategorySpace
- }
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to a human readable string.
- //
- resource kODNameMappings (kKindUserStringMapId) {
- kODKindUserString,
- { /* array Types: 1 elements */
- /* [1] */
- kPanelEditorKind,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kPanelEditorKindUserString
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to an old style MacOS Type (and/or ScrapType)
- //
- resource kODNameMappings (kOldMacOSTypeMapId) {
- kODKindOldMacOSType,
- { /* array KeyList: 1 elements */
- /* [1] */
- kPanelEditorKind,
- kODIsMacOSType {
- kPanelEditorDocumentOSType
- }
- }
- };
-
- //-------------------------------------------------------------------------------------
- // OLE Interoperability Support
- //-------------------------------------------------------------------------------------
-
- // This resource allows your editor to be registered with the OLE runtime on the
- // Macintosh and subsequently interoperate with OLE clients/servers. Contact Microsoft
- // to acqiure a unique class ID.
- resource 'olcr' (0, "OLE Class ID")
- {
- "{80C11F40-7503-8576-00D01113F11}"; /* your part's CLSID */
- };
-
- //-------------------------------------------------------------------------------------
- // Finder Related Resources
- //-------------------------------------------------------------------------------------
-
- // Kind resources affect the text Finder displays in the
- // "kind" column and file info dialog. This feature was
- // introduced as part of Macintosh Easy Open.
- //
- resource 'kind' (kBaseResourceID) {
- kPanelEditorEditorOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ editor"
- }
- };
-
- resource 'kind' (kBaseResourceID+1) {
- kPanelEditorViewerOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ viewer"
- }
- };
-
- resource 'kind' (kBaseResourceID+2) {
- kODShellSignature,
- 0, /* region = USA */
- {
- kPanelEditorDocumentOSType, "Panel Editor 1.0 document",
- kPanelEditorStationeryOSType, "Panel Editor 1.0 stationery"
- }
- };
-
- // The -16397 string will be displayed by Finder when a user
- // tries to open the editor shared library. The string should
- // give the user a little detail about the part's capabilities
- // and enough information to install the part in the correct location.
- //
- resource 'STR ' (-16397, purgeable) {
- "OpenDoc™ editor\n\n“Panel Editor” allows you to create and edit a documen"
- "t of embedded parts. To work properly, it should be placed in the Editors"
- " folder. To create a new document, open a stationery pad."
- };
-
- //-------------------------------------------------------------------------------------
- // String Resources
- //-------------------------------------------------------------------------------------
-
- resource 'STR#' (kMenuStringResID, "Menu Items strings") {
- { /* array StringArray: 1 elements */
- /* [1] */
- "About Panel Editor…"
- }
- };
-
- resource 'STR#' (kErrorStringResID, "Error strings") {
- { /* array StringArray: 4 elements */
- /* [1] */
- "“Panel Editor” was unable completely ini"
- "tialize it's internal structures.",
- /* [2] */
- "“Panel Editor” was unable to open the do"
- "cument due to unforseen circumstances.",
- /* [3] */
- "“Panel Editor” was unable to open a part"
- " window due to unforseen circumstances.",
- /* [4] */
- "“Panel Editor” has been asked to remove "
- "a frame that does not belong to it, or a"
- "n error occurred while removing the fram"
- "e from internal storage.",
- /* [5] */
- "A window that “Panel Editor” created has"
- " been deleted without its knowledge. Thi"
- "s may generate a fatal error in the near"
- " future. Please close the document immed"
- "iately to prevent data loss.",
- /* [6] */
- "“Panel Editor” encountered a fatal error"
- " while trying to save. Try saving again "
- "or closing the document."
- }
- };
-
- resource 'STR#' (kUndoStringResID, "Undo Strings") {
- { /* array StringArray: 10 elements */
- /* [1] */
- "Undo Cut",
- /* [2] */
- "Redo Cut",
- /* [3] */
- "Undo Paste",
- /* [4] */
- "Redo Paste",
- /* [5] */
- "Undo Clear",
- /* [6] */
- "Redo Clear",
- /* [7] */
- "Undo Drop",
- /* [8] */
- "Redo Drop",
- /* [9] */
- "Undo Drag",
- /* [10] */
- "Redo Drag"
- }
- };
-
- resource 'STR#' (kItemNameResID, "Untitled Item name") {
- { /* array StringArray: 1 elements */
- /* [1] */
- "<untitled>"
- }
- };
-
- //-------------------------------------------------------------------------------------
- // Menu Resources
- //-------------------------------------------------------------------------------------
-
- resource 'MENU' (kPanelMenuID) {
- kPanelMenuID,
- textMenuProc,
- allEnabled,
- enabled,
- "Panel",
- { /* array: 2 elements */
- /* [1] */
- "Layout", noIcon, noKey, check, plain,
- /* [2] */
- "Browse", noIcon, noKey, noMark, plain
- }
- };
-
- //-------------------------------------------------------------------------------------
- // Dialog Resources
- //-------------------------------------------------------------------------------------
-
- resource 'DLOG' (kAboutBoxID, "About Box") {
- {0, 0, 250, 350},
- dBoxProc,
- visible,
- goAway,
- 0x0,
- kAboutBoxID,
- "",
- alertPositionMainScreen
- };
-
- resource 'DITL' (kAboutBoxID) {
- { /* array DITLarray: 8 elements */
- /* [1] */
- {222, 270, 242, 338}, Button { enabled, "OK" },
- /* [2] */
- {24, 25, 56, 57}, Picture { disabled, kEditorIconPicture },
- /* [3] */
- {13, 68, 237, 69}, Button { disabled, "" },
- /* [4] */
- {64, 13, 65, 337}, Button { disabled, "" },
- /* [5] */
- {46, 76, 62, 172}, StaticText { disabled, "Panel Editor" },
- /* [6] */
- {76, 76, 116, 304}, StaticText { disabled,
- "PanelEditor is a sample part editor which"
- " illustrates the functionality of a basi"
- "c embedding part editor." },
- /* [7] */
- {124, 76, 152, 304}, StaticText { disabled,
- "Written by Steve Smith with support from"
- " the OpenDoc™ Engineering team." },
- /* [8] */
- {172, 76, 200, 300}, StaticText { disabled,
- "Copyright© 1994,1995 by Apple Computer, "
- "Inc. All Rights Reserved." },
- /* [9] */
- {51, 272, 64, 340}, StaticText { disabled,
- "Version "shortVersionStr }
- }
- };
-
- resource 'dctb' (kAboutBoxID) {
- /* dialog background fill color */
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 59127, 59127, 59127,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- data 'ictb' (kAboutBoxID) {
- /* dialog control text styling */
- $"0000000000000000002800240028"
- $"004C80070074800700888007009C"
- $"800700B0800700C4000000000000"
- $"000300007FFF7FFF7FFF0001FFFF"
- $"FFFFFFFF00020000000000000003"
- $"FFFFFFFFFFFF0000000000000003"
- $"00007FFF7FFF7FFF0001FFFFFFFF"
- $"FFFF00020000000000000003FFFF"
- $"FFFFFFFF00D80100000E00000000"
- $"0000FFFFFFFFFFFF000000E10000"
- $"0009000000000000FFFFFFFFFFFF"
- $"000000E800000009000000000000"
- $"FFFFFFFFFFFF000000EF00000009"
- $"000000000000FFFFFFFFFFFF0000"
- $"00F600000009000000000000FFFF"
- $"FFFFFFFF00000850616C6174696E"
- $"6F0647656E6576610647656E6576"
- $"610647656E6576610647656E6576"
- $"61"
- };
-
- resource 'DLOG' (kErrorBoxID, "Error Box") {
- {57, 46, 244, 374},
- dBoxProc,
- visible,
- goAway,
- 0x0,
- kErrorBoxID,
- "",
- alertPositionParentWindowScreen
- };
-
- resource 'DITL' (kErrorBoxID) {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {153, 256, 173, 314}, Button { enabled, "OK" },
- /* [2] */
- {153, 185, 173, 243}, Button { enabled, "Cancel" },
- /* [3] */
- {11, 70, 124, 317}, StaticText { disabled,
- "<< Use this for errors in the Editor, su"
- "ch as out of memory, unable to acquire s"
- "ome system resource, etc.>> \nUser errors"
- " use a standard alert appearance. See DI"
- "TL 129.>>" },
- /* [4] */
- {11, 19, 43, 51}, Picture { disabled, kEditorIconPicture },
- /* [5] */
- {149, 252, 177, 318}, UserItem { disabled }
- }
- };
-
- //-------------------------------------------------------------------------------------
- // Finder Bundle Information
- //-------------------------------------------------------------------------------------
-
- resource 'BNDL' (kDocumentBundle, "Document BNDL") {
- kODShellSignature,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentFREF,
- /* [2] */
- 1, kStationeryFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentIcons,
- /* [2] */
- 1, kStationeryIcons
- }
- }
- };
-
- resource 'BNDL' (kEditorBundle, "Editor BNDL") {
- kPanelEditorEditorOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorIcons
- }
- }
- };
-
- resource 'BNDL' (kViewerBundle, "Viewer BNDL") {
- kPanelEditorViewerOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerIcons
- }
- }
- };
-
- resource 'FREF' (kDocumentFREF) {
- kPanelEditorDocumentOSType, 0, ""
- };
-
- resource 'FREF' (kStationeryFREF) {
- kPanelEditorStationeryOSType, 1, ""
- };
-
- resource 'FREF' (kEditorFREF) {
- 'shlb', 0, ""
- };
-
- resource 'FREF' (kViewerFREF) {
- 'shlb', 0, ""
- };
-
- data kODShellSignature (0, "Owner resource") {
- $"00"
- };
-
- data kPanelEditorViewerOSType (0, "Owner resource") {
- $"00"
- };
-
- data kPanelEditorEditorOSType (0, "Owner resource") {
- $"00"
- };
-